<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <!--{include file='comm/header.tpl'}-->
    <link rel="stylesheet" href="/quanliadmin/docroot/css/storage.css" type="text/css" media="screen" />
    <title><!--{$customerInfo.custID}-->  - 账户信息</title>

</head>
<body>

<div style="width:100%">

    <div class="container">
        <div class="comm_crub">
			    <span class="now_crub"><!--{$customerInfo.custID}--> - 账户信息</span>
        </div>

        <div class="comm_content">

            <div class="panel panel-default">

                <div class="panel-heading">账户信息</div>

                <table class="table table-striped">

                    <thead>
                    <tr>
                        <th>账户名</th>
                        <th>可用余额</th>
                        <th>冻结余额</th>
                    </tr>
                    </thead>

                    <tbody>
                    <!--{if isset($account_array)}-->
                        <!--{foreach from=$account_array item=account}-->
                            <tr>
                                <td><!--{$account.subjectName}--></td>
                                <td><!--{$account.useableAccount}--></td>
                                <td><!--{$account.lockAccount}--></td>
                            </tr>
                        <!--{/foreach}-->
                    <!--{/if}-->
                    </tbody>

                </table>

            </div>


            <!--{if isset($account_array)}-->
            <div class="panel panel-default">
                <h2 class="panel-heading">
                    会员账户交易历史
                </h2>
                <div class="panel-body">

                    <form id="search_form" onsubmit="return false;">

                        <div class="navigation" id="navigation" style="margin-bottom: 13px;">
                            <ul class="nav nav-tabs">
                                <!--{foreach from=$account_array item=account key=k}-->
                                    <!--{if $k == 0}-->
                                        <li class="active" subjectId="<!--{$account.subjectId}-->">
                                            <a href="javascript:void(0)"><!--{$account.subjectName}--></a>
                                        </li>
                                    <!--{else}-->
                                        <li subjectId="<!--{$account.subjectId}-->">
                                            <a href="javascript:void(0)"><!--{$account.subjectName}--></a>
                                        </li>
                                    <!--{/if}-->
                                <!--{/foreach}-->
                            </ul>
                        </div>

                        <input type="hidden" name="subjectID" id="subjectID" value="<!--{$account_array.0.subjectId}-->"/>

                    </form>

                    <table id="flex" style="display:none"></table>

                </div>
            </div>
            <!--{/if}-->

        </div>

    </div>
</div>


<script type="text/javascript">

    $("#flex").flexigrid({
        url:"/invokingAjax-backend/customer/customer.ajax?operFlg=13&pcustID=<!--{$customerInfo.pcustID}-->",
        dataType: "json",
        colModel : [
            {display: "交易时间", name : "seqno", sortable : true,width : 140, align: "center"},
            {display: "交易类型", width : 80, align:"left"},
            {display: "变更可用金额", width : 100, align:"left"},
            {display: "变更后可用金额", width : 100, align:"left"},
            {display: "变更冻结金额", width : 100, align:"left"},
            {display: "变更后冻结金额", width : 100, align:"center"},
            {display: "订单号", width : 150, align:"left"},
            {display: "备注", width : 300, align:"left"}
        ],
        sortname: "seqno",
        sortorder: "DESC",
        usepager: true,
        rp: 10,
        height:300,
        useRp: true,
        showTableToggleBtn: true,
        autoload: true,
        onSubmit: function() {
            var dt = $('#search_form').serializeArray();
            $("#flex").flexOptions({params: dt});
            return true;
        }
    });

    //重新加载
    function load() {
        $("#flex").flexReload();
    }
    
    $(function() {

        $('#navigation').find('li').click(function() {

            if ($(this).hasClass('active')) {
                return false;
            }

            $('#navigation').find('li').removeClass('active').eq($(this).index()).addClass('active');

            $('#subjectID').val($(this).attr('subjectID'));

            load();

        });

    });


</script>


</body>
</html>